<?php
namespace app\controller;

use app\BaseController;
use app\Request;
use app\model\User as UserModel;

class Index extends BaseController
{
    public function hello(Request $request){
        return $request->param('uid');
    }

    public function index()
    {
         $userModel = new UserModel;
         $list = $userModel->select();
         $jsonList = json($list);
         return $jsonList;

    }

    public function test(){
        try {

        } catch (\Exception $e) {
            $error = ["status"=>false,"msg"=>$e->getMessage(),"code"=>$e->getCode()];
            return json($error);
        }
    }

}
